<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui, viewport-fit=cover">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <title>My App</title>
    <link rel="stylesheet" href="../../packages/core/css/framework7.min.css">
    <link rel="stylesheet" href="../../css/framework7-icons.css">
  </head>
  <body>
    <div id="app"></div>
    <template id="app-template">
      <f7-app>
        <f7-view main>
          <f7-page>
            <f7-navbar title="Range Slider"></f7-navbar>
            <f7-block-title>Volume</f7-block-title>
            <f7-list simple-list>
              <f7-list-item>
                <f7-list-item-cell class="width-auto flex-shrink-0">
                  <f7-icon ios="f7:volume_mute_fill" md="material:volume_mute"></f7-icon>
                </f7-list-item-cell>
                <f7-list-item-cell class="flex-shrink-3">
                  <f7-range :min="0" :max="100" :step="1" :value="10"></f7-range>
                </f7-list-item-cell>
                <f7-list-item-cell class="width-auto flex-shrink-0">
                  <f7-icon ios="f7:volume_fill" md="material:volume_up"></f7-icon>
                </f7-list-item-cell>
              </f7-list-item>
            </f7-list>
      
            <f7-block-title>Brightness</f7-block-title>
            <f7-list simple-list>
              <f7-list-item>
                <f7-list-item-cell class="width-auto flex-shrink-0">
                  <f7-icon ios="f7:circle" md="material:brightness_low"></f7-icon>
                </f7-list-item-cell>
                <f7-list-item-cell class="flex-shrink-3">
                  <f7-range :min="0" :max="100" :step="1" :value="50" :label="true" color="orange"></f7-range>
                </f7-list-item-cell>
                <f7-list-item-cell class="width-auto flex-shrink-0">
                  <f7-icon ios="f7:circle_half" md="material:brightness_high"></f7-icon>
                </f7-list-item-cell>
              </f7-list-item>
            </f7-list>
      
            <f7-block-title class="display-flex justify-content-space-between">Price Filter <span>${{priceMin}} - ${{priceMax}}</span></f7-block-title>
            <f7-list simple-list>
              <f7-list-item>
                <f7-list-item-cell class="width-auto flex-shrink-0">
                  <f7-icon ios="f7:circle" md="material:brightness_low"></f7-icon>
                </f7-list-item-cell>
                <f7-list-item-cell class="flex-shrink-3">
                  <f7-range :min="0" :max="500" :step="1" :value="[priceMin, priceMax]" :label="true" :dual="true" color="green" @range:change="onPriceChange"></f7-range>
                </f7-list-item-cell>
                <f7-list-item-cell class="width-auto flex-shrink-0">
                  <f7-icon ios="f7:circle_half" md="material:brightness_high"></f7-icon>
                </f7-list-item-cell>
              </f7-list-item>
            </f7-list>
          </f7-page>
        </f7-view>
      </f7-app>
      
    </template>
    <script>
      var component = {
        data() {
          return {
            priceMin: 200,
            priceMax: 400,
          };
        },
        methods: {
          onPriceChange(values) {
            this.priceMin = values[0];
            this.priceMax = values[1];
          },
        },
      }
    </script>
    <script src="../../packages/vue/vue.min.js"></script>
    <script src="../../packages/vue/framework7-vue.min.js"></script>
    <script src="../../packages/core/js/framework7.min.js"></script>
    <script>
      var theme = 'ios';
      if (location.href.indexOf('theme=md') >= 0) theme = 'md';
      
      if (Framework7.use) Framework7.use(Framework7Vue, { theme: theme });
      else if (Framework7.Class && Framework7.Class.use) Framework7.Class.use(Framework7Vue, { theme: theme });
      
      var plugin = {
        params: {
          theme: theme,
        }
      };
      
      if (Framework7.use) Framework7.use(plugin);
      else if (Framework7.Class && Framework7.Class.use) Framework7.Class.use(plugin);
      
      if (typeof component === 'undefined') {
        var component = {};
      }
      if (typeof routes === 'undefined') {
        var routes = [];
      }
      component.el = '#app';
      component.template = '#app-template';
      
      new Vue(component);
    </script>
  </body>
</html>